
If ProcessExists("Rogue Tools.exe") Then
	$f = 0
Else
	MsgBox(4096, "Rogue Tools?", "You need to be running Rogue Tools in order to use this control")
	Exit
EndIf

$filepu = FileOpen(@ProgramFilesDir & "\burnersware\Rogue Tools\include\vars\powervars.txt", 0)
$alt1pu = FileReadLine($filepu, 1)
$alt2pu = FileReadLine($filepu, 2)
$alt3pu = FileReadLine($filepu, 3)
$alt5pu = FileReadLine($filepu, 4)
$alt6pu = FileReadLine($filepu, 5)
$alt7pu = FileReadLine($filepu, 6)
$mptpu = FileReadLine($filepu, 7)
$alt5tpu = FileReadLine($filepu, 8)
$alt6tpu = FileReadLine($filepu, 9)
$alt7tpu = FileReadLine($filepu, 10)
$mprpu = FileReadLine($filepu, 11)
$refreshpu = FileReadLine($filepu, 12)
$followpu = FileReadLine($filepu, 13)
FileClose($filepu)

Global $resa = @DesktopWidth
Global $resb = @DesktopHeight
Global $winadded = $resa + $resb

If $winadded <> 1400 And $winadded <> 1792 And $winadded <> 2304 And $winadded <> 2800 Then
	nowinres()
EndIf

GUICreate("Rogue PowerUp", 550, 380, -1, -1, -1, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
GUICtrlCreatePic(@ProgramFilesDir & "\burnersware\Rogue Tools\Include\img\burnerssidebarpower.jpg", 0, 22, 155, 360)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("MP Report-------------Delay", 170, 200, 170, 60)
GUIStartGroup()
$mp1 = GUICtrlCreateRadio("On", 190, 220, 45, 15)
$mp0 = GUICtrlCreateRadio("Off", 190, 235, 45, 15)
GUISetFont(9, 400)
If $mprpu = 1 Then
	GUICtrlSetState($mp1, $GUI_CHECKED)
EndIf
If $mprpu = 4 Then
	GUICtrlSetState($mp0, $GUI_CHECKED)
EndIf
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("HP Detect", 170, 80, 170, 110)
GUIStartGroup()
$altp11 = GUICtrlCreateRadio("On", 180, 95, 32, 15)
$altp10 = GUICtrlCreateRadio("Off", 180, 110, 32, 15)
GUISetFont(12, 400,)
If $alt1pu = 1 Then
	GUICtrlSetState($altp11, $GUI_CHECKED)
EndIf
If $alt1pu = 4 Then
	GUICtrlSetState($altp10, $GUI_CHECKED)
EndIf
GUICtrlCreateLabel("HP 1/4 Detect", 220, 100, 115, 20)
GUIStartGroup()
GUISetFont(9, 400)
$altp21 = GUICtrlCreateRadio("On", 180, 125, 32, 15)
$altp20 = GUICtrlCreateRadio("Off", 180, 140, 32, 15)
GUISetFont(12, 400,)
If $alt2pu = 1 Then
	GUICtrlSetState($altp21, $GUI_CHECKED)
EndIf
If $alt2pu = 4 Then
	GUICtrlSetState($altp20, $GUI_CHECKED)
EndIf
GUICtrlCreateLabel("HP 1/2 Detect", 220, 130, 115, 20)
GUIStartGroup()
GUISetFont(9, 400)
$altp31 = GUICtrlCreateRadio("On", 180, 155, 32, 15)
$altp30 = GUICtrlCreateRadio("Off", 180, 170, 32, 15)
GUISetFont(12, 400,)
If $alt3pu = 1 Then
	GUICtrlSetState($altp31, $GUI_CHECKED)
EndIf
If $alt3pu = 4 Then
	GUICtrlSetState($altp30, $GUI_CHECKED)
EndIf
GUICtrlCreateLabel("HP 3/4 Detect", 220, 160, 115, 20)
GUISetFont(9, 400)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("Raise", 365, 220, 80, 60)
$refresh1 = GUICtrlCreateRadio("On", 375, 240, 45, 15)
$refresh0 = GUICtrlCreateRadio("Off", 375, 255, 45, 15)
If $refreshpu = 1 Then
	GUICtrlSetState($refresh1, $GUI_CHECKED)
EndIf
If $refreshpu = 4 Then
	GUICtrlSetState($refresh0, $GUI_CHECKED)
EndIf
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("follow", 455, 220, 80, 60)
$follow1 = GUICtrlCreateRadio("On", 465, 240, 45, 15)
$follow0 = GUICtrlCreateRadio("Off", 465, 255, 45, 15)
If $followpu = 1 Then
	GUICtrlSetState($follow1, $GUI_CHECKED)
EndIf
If $followpu = 4 Then
	GUICtrlSetState($follow0, $GUI_CHECKED)
EndIf
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("ALT Macros--------------Delay", 365, 80, 170, 130)
GUIStartGroup()
GUISetFont(24, 400,)
GUICtrlCreateLabel("5", 375, 95, 17, 33)
GUISetFont(9, 400)
$altp51 = GUICtrlCreateRadio("On", 405, 100, 45, 15)
$altp50 = GUICtrlCreateRadio("Off", 405, 115, 45, 15)
GUISetFont(9, 400)
If $alt5pu = 1 Then
	GUICtrlSetState($altp51, $GUI_CHECKED)
EndIf
If $alt5pu = 4 Then
	GUICtrlSetState($altp50, $GUI_CHECKED)
EndIf
$altp5m = GUICtrlCreateCombo("0", 450, 105, 37, 150, BitOR($ES_READONLY, $CBS_DROPDOWNLIST, $LBS_STANDARD, $CBS_NOINTEGRALHEIGHT))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59", "0")
$altp5s = GUICtrlCreateCombo("0", 490, 105, 37, 150, BitOR($ES_READONLY, $CBS_DROPDOWNLIST, $LBS_STANDARD, $CBS_NOINTEGRALHEIGHT))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59", "0")
GUIStartGroup()
GUISetFont(24, 400,)
GUICtrlCreateLabel("6", 375, 130, 17, 33)
GUISetFont(9, 400)
$altp60 = GUICtrlCreateRadio("Off", 405, 150, 45, 15)
GUISetFont(9, 400)
$altp6m = GUICtrlCreateCombo("0", 450, 140, 37, 150, BitOR($ES_READONLY, $CBS_DROPDOWNLIST, $LBS_STANDARD, $CBS_NOINTEGRALHEIGHT))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59", "0")
$altp6s = GUICtrlCreateCombo("0", 490, 140, 37, 150, BitOR($ES_READONLY, $CBS_DROPDOWNLIST, $LBS_STANDARD, $CBS_NOINTEGRALHEIGHT))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59", "0")
GUIStartGroup()
GUISetFont(24, 400,)
GUICtrlCreateLabel("7", 375, 165, 17, 33)
GUISetFont(9, 400)
$altp70 = GUICtrlCreateRadio("Off", 405, 185, 45, 15)
GUISetFont(9, 400)
$altp7m = GUICtrlCreateCombo("0", 450, 175, 37, 150, BitOR($ES_READONLY, $CBS_DROPDOWNLIST, $LBS_STANDARD, $CBS_NOINTEGRALHEIGHT))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59", "0")
$altp7s = GUICtrlCreateCombo("0", 490, 175, 37, 150, BitOR($ES_READONLY, $CBS_DROPDOWNLIST, $LBS_STANDARD, $CBS_NOINTEGRALHEIGHT))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59", "0")
GUICtrlSetState($altp60, $GUI_CHECKED)
GUICtrlSetState($altp70, $GUI_CHECKED)
GUISetFont(9, 400)
GUICtrlCreateGroup("", 465, 308, 80, 47)
$OKpower = GUICtrlCreateButton("RUN", 475, 325, 60, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlSetState(-1, $GUI_CHECKED)




GUISetState()
While 1
	$msg = GUIGetMsg()
	If $msg = $OKpower Then
		powerc()
		powerr()
	EndIf
	If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd

Func powerc()
	$filepower = FileOpen(@ProgramFilesDir & "\burnersware\Rogue Tools\include\vars\powervars.txt", 2)
	Local $altp5mm = Round(GUICtrlRead($altp5m) * 100 / 1.65, -1)
	Local $altp6mm = Round(GUICtrlRead($altp6m) * 100 / 1.65, -1)
	Local $altp7mm = Round(GUICtrlRead($altp7m) * 100 / 1.65, -1)
	FileWrite($filepower, GUICtrlRead($altp11) & @CRLF)
	FileWrite($filepower, GUICtrlRead($altp21) & @CRLF)
	FileWrite($filepower, GUICtrlRead($altp31) & @CRLF)
	FileWrite($filepower, GUICtrlRead($altp51) & @CRLF)
	FileWrite($filepower, 4 & @CRLF)
	FileWrite($filepower, 4 & @CRLF)
	FileWrite($filepower, 0 & @CRLF)
	FileWrite($filepower, $altp5mm + GUICtrlRead($altp5s) & "000" & @CRLF)
	FileWrite($filepower, $altp6mm + GUICtrlRead($altp6s) & "000" & @CRLF)
	FileWrite($filepower, $altp7mm + GUICtrlRead($altp7s) & "000" & @CRLF)
	FileWrite($filepower, GUICtrlRead($mp1) & @CRLF)
	FileWrite($filepower, GUICtrlRead($refresh1) & @CRLF)
	FileWrite($filepower, GUICtrlRead($follow1) & @CRLF)
	FileClose($filepower)
EndFunc ;==>powerc

Func powerr()
	Run("Rogue PowerUp Bot.exe")
	Exit
EndFunc ;==>powerr

Func nowinres()
	MsgBox(4096, "Resolution Error", "Your current windows resolution is not supported _
			"  & @CRLF & " Please Switch To one of the four supported resolutions And restart Burners 7in1 Software"  & @CRLF & " These Include 800x600 & 1024x768 & 1280x1024 & 1600x1200 _
			" & @CRLF & " Thank You")
	Exit
EndFunc ;==>nowinres

